package com.example.javamediaserver.repository;

import com.example.javamediaserver.model.Recording;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface RecordingRepository extends JpaRepository<Recording, String> {

    List<Recording> findByAppAndStreamKey(String app, String streamKey);
    
    List<Recording> findByAppOrderByCreatedTimeDesc(String app);
    
    Optional<Recording> findByFileName(String fileName);
} 